<?php
include_once(SYSTEM.'/ValidationRule.php');

class MatchRule extends ValidationRule 
{
	public $String;	

	public function __construct($string, $message) 
	{
		$this->String = $string;
		
		if(!isset($message))
		{
			$message = 'Hai chuoi k trung nhau';
		}
		parent::__construct($message);	
	}
	
	public function Validate($param) 
	{
		if($param !== $this->String)
			return $this->Message;
		 
		return 'OK';
	}
}